/*
 * AESEncrypter.cpp
 *
 *  Created on: Mar 22, 2010
 *      Author: Lukasz Spintzyk
 */

#include "Encrypter.h"

AESEncrypter::AESEncrypter():
	iv(0)
{
}

AESEncrypter::AESEncrypter(BigInteger& init_vector, byte* key)
	:iv(init_vector)
{
	AES_set_encrypt_key(key, 16*8, &d_key);
}

AESEncrypter::~AESEncrypter()
{
}

AES_KEY AESEncrypter::getKey() const
{
	return d_key;
}

const uint32_t AESEncrypter::s_keySize = 32;	// NB_8
const uint32_t AESEncrypter::s_blockSize = 16;  // NB_4
const uint32_t AESEncrypter::s_roundNum = 14;			// NR
const uint32_t AESEncrypter::s_expandedKeySize = 4 * 4 *(14+1); // 4* 60

